home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: frame.tcl,v 1.3 1995/02/03 16:54:45 zibi Exp $
- #
- # a test of the frame widget
- #
-
- proc quitCB {form cbs} {
- VtClose
- exit 0
- }
-
- proc changeFrameCB {frame type cbs} {
- VtSetValues $frame -shadowType $type -title $type
- }
-
- proc noTitleCB {frame cbs} {
- VtSetValues $frame -title NONE
- }
-
- #
- # Start Program
- #
- #
- set ap [VtOpen frame]
-
- set fn [VtStartForm $ap.form -title "VtFrame" ]
-
- set frame [VtFrame $fn.frame \
- -title "ETCHED_IN" \
- -topSide FORM \
- -leftSide FORM \
- -bottomSide FORM ]
-
- # This puts a row column inside the frame to give
- # it some width.
- set rc1 [VtRowColumn $frame.rc1]
- VtLabel $rc1.lab1 -label " "
-
-
-
- set rc2 [VtRowColumn $fn.rc2 -leftSide NONE -rightSide FORM -topSide FORM]
-
- foreach type {IN OUT ETCHED_IN ETCHED_OUT} {
- VtPushButton $rc2.$type -label $type \
- -callback "changeFrameCB $frame $type"
- }
-
- VtPushButton $rc2.none -label "No Title" -callback "noTitleCB $frame"
- VtPushButton $rc2.quit -label QUIT -callback "quitCB $fn"
-
- VtSetValues $frame -rightSide $rc2 -rightOffset 30
-
- VtShow $fn
- VtMainLoop
-
-